Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> #div1 { position: relative; height: 200px; width: 200px; margin: 100px; padding: 10px; border: 1px solid black; } #div2 { padding: 50px; position: absolute; border: 1px solid black; background-color: red; -webkit-transform: rotateY(60deg); /* Chrome, Safari, Opera */ -webkit-transform-style: preserve-3d; /* Chrome, Safari, Opera */ transform: rotateY(60deg); transform-style: preserve-3d; } #div3 { padding: 40px; position: absolute; border: 1px solid black; background-color: yellow; -webkit-transform: rotateY(-60deg); /* Chrome, Safari, Opera */ transform: rotateY(-60deg); } </style> </head> <body> <div id="div1"> <div id="div2">HELLO <div id="div3">YELLOW</div> </div> </div> <p><b>Note:</b> Internet Explorer 10 and earlier versions do not support the transform-style property.</p> <p><b>Note:</b> Chrome, Safari and Opera supports an alternative, the -webkit-transform-style property.</p> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss3_transform-style by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:53:38 GMT --> </html>
Result:
Try it Yourself - © w3schools.com